D:\git\skunkworks\herald-for-cpp\herald\include\herald\analysis\sampling.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2021 Herald Project Contributors |
2 | | // SPDX-License-Identifier: Apache-2.0 |
3 | | // |
4 | | |
5 | | #ifndef HERALD_SAMPLING_H |
6 | | #define HERALD_SAMPLING_H |
7 | | |
8 | | #include "../datatype/date.h" |
9 | | |
10 | | #include <array> |
11 | | #include <cstdint> |
12 | | #include <type_traits> |
13 | | |
14 | | namespace herald { |
15 | | namespace analysis { |
16 | | /// A set of structs compatible with, but not reliant upon, views and ranges in Herald |
17 | | namespace sampling { |
18 | | |
19 | | using namespace herald::datatype; |
20 | | |
21 | | /// The unique ID of a source instance that has been sampled. |
22 | | /// E.g. 64 bit hash of some unique identifier in the source physical realm |
23 | | /// (unknown to the analysis engine) |
24 | | using SampledID = std::size_t; |
25 | | |
26 | | /// The Sample taken from an object with ID of type SampledID |
27 | | template <typename ValT> |
28 | | struct Sample { |
29 | | using value_type = ValT; |
30 | | |
31 | | Date taken; // Date first for alignment reasons |
32 | | ValT value; |
33 | | |
34 | 996 | Sample() : taken(), value() {} // default ctor (required for array) ??0?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 34 | 424 | Sample() : taken(), value() {} // default ctor (required for array) |
??0?$Sample@H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 34 | 90 | Sample() : taken(), value() {} // default ctor (required for array) |
??0?$Sample@N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 34 | 32 | Sample() : taken(), value() {} // default ctor (required for array) |
??0?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 34 | 450 | Sample() : taken(), value() {} // default ctor (required for array) |
|
35 | 259 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} ??0?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@VDate@datatype@3@VRSSI@53@@Z Line | Count | Source | 35 | 201 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} |
??0?$Sample@H@sampling@analysis@herald@@QEAA@VDate@datatype@3@H@Z Line | Count | Source | 35 | 28 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} |
??0?$Sample@N@sampling@analysis@herald@@QEAA@VDate@datatype@3@N@Z Line | Count | Source | 35 | 12 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} |
??0?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAA@VDate@datatype@3@UDistance@53@@Z Line | Count | Source | 35 | 8 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} |
??0?$Sample@C@sampling@analysis@herald@@QEAA@VDate@datatype@3@C@Z Line | Count | Source | 35 | 10 | Sample(Date sampled, ValT v) : taken(Date{sampled.secondsSinceUnixEpoch()}), value(v) {} |
|
36 | 508 | Sample(const Sample& other) : taken(Date{other.taken.secondsSinceUnixEpoch()}), value(other.value) {} // copy ctor ??0?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 36 | 439 | Sample(const Sample& other) : taken(Date{other.taken.secondsSinceUnixEpoch()}), value(other.value) {} // copy ctor |
??0?$Sample@H@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 36 | 3 | Sample(const Sample& other) : taken(Date{other.taken.secondsSinceUnixEpoch()}), value(other.value) {} // copy ctor |
??0?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 36 | 66 | Sample(const Sample& other) : taken(Date{other.taken.secondsSinceUnixEpoch()}), value(other.value) {} // copy ctor |
|
37 | 702 | Sample(Sample&& other) : taken(std::move(other.taken)), value(std::move(other.value)) {} // move ctor ??0?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 37 | 102 | Sample(Sample&& other) : taken(std::move(other.taken)), value(std::move(other.value)) {} // move ctor |
??0?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 37 | 600 | Sample(Sample&& other) : taken(std::move(other.taken)), value(std::move(other.value)) {} // move ctor |
|
38 | | template <typename... Args> |
39 | 13 | Sample(int secondsSinceEpoch,Args... args) : taken(Date(secondsSinceEpoch)), value(ValT(args...)) {} // initialiser list constructor ??$?0H@?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@HH@Z Line | Count | Source | 39 | 10 | Sample(int secondsSinceEpoch,Args... args) : taken(Date(secondsSinceEpoch)), value(ValT(args...)) {} // initialiser list constructor |
??$?0H@?$Sample@H@sampling@analysis@herald@@QEAA@HH@Z Line | Count | Source | 39 | 1 | Sample(int secondsSinceEpoch,Args... args) : taken(Date(secondsSinceEpoch)), value(ValT(args...)) {} // initialiser list constructor |
??$?0N@?$Sample@N@sampling@analysis@herald@@QEAA@HN@Z Line | Count | Source | 39 | 2 | Sample(int secondsSinceEpoch,Args... args) : taken(Date(secondsSinceEpoch)), value(ValT(args...)) {} // initialiser list constructor |
|
40 | 2.47k | ~Sample() = default; ??1?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 40 | 1.17k | ~Sample() = default; |
??1?$Sample@H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 40 | 122 | ~Sample() = default; |
??1?$Sample@N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 40 | 46 | ~Sample() = default; |
??1?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 40 | 1.12k | ~Sample() = default; |
??1?$Sample@C@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 40 | 10 | ~Sample() = default; |
|
41 | | |
42 | 823 | Sample& operator=(Sample&& other) { |
43 | 823 | taken = std::move(other.taken); |
44 | 823 | value = std::move(other.value); |
45 | 823 | return *this; |
46 | 823 | } ??4?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAAAEAU0123@$$QEAU0123@@Z Line | Count | Source | 42 | 184 | Sample& operator=(Sample&& other) { | 43 | 184 | taken = std::move(other.taken); | 44 | 184 | value = std::move(other.value); | 45 | 184 | return *this; | 46 | 184 | } |
??4?$Sample@H@sampling@analysis@herald@@QEAAAEAU0123@$$QEAU0123@@Z Line | Count | Source | 42 | 27 | Sample& operator=(Sample&& other) { | 43 | 27 | taken = std::move(other.taken); | 44 | 27 | value = std::move(other.value); | 45 | 27 | return *this; | 46 | 27 | } |
??4?$Sample@N@sampling@analysis@herald@@QEAAAEAU0123@$$QEAU0123@@Z Line | Count | Source | 42 | 12 | Sample& operator=(Sample&& other) { | 43 | 12 | taken = std::move(other.taken); | 44 | 12 | value = std::move(other.value); | 45 | 12 | return *this; | 46 | 12 | } |
??4?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAAAEAU0123@$$QEAU0123@@Z Line | Count | Source | 42 | 600 | Sample& operator=(Sample&& other) { | 43 | 600 | taken = std::move(other.taken); | 44 | 600 | value = std::move(other.value); | 45 | 600 | return *this; | 46 | 600 | } |
|
47 | | |
48 | 64 | Sample& operator=(const Sample& other) { |
49 | 64 | taken = Date{other.taken.secondsSinceUnixEpoch()}; |
50 | 64 | value = other.value; |
51 | 64 | return *this; |
52 | 64 | } ??4?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEAAAEAU0123@AEBU0123@@Z Line | Count | Source | 48 | 37 | Sample& operator=(const Sample& other) { | 49 | 37 | taken = Date{other.taken.secondsSinceUnixEpoch()}; | 50 | 37 | value = other.value; | 51 | 37 | return *this; | 52 | 37 | } |
??4?$Sample@H@sampling@analysis@herald@@QEAAAEAU0123@AEBU0123@@Z Line | Count | Source | 48 | 1 | Sample& operator=(const Sample& other) { | 49 | 1 | taken = Date{other.taken.secondsSinceUnixEpoch()}; | 50 | 1 | value = other.value; | 51 | 1 | return *this; | 52 | 1 | } |
??4?$Sample@N@sampling@analysis@herald@@QEAAAEAU0123@AEBU0123@@Z Line | Count | Source | 48 | 2 | Sample& operator=(const Sample& other) { | 49 | 2 | taken = Date{other.taken.secondsSinceUnixEpoch()}; | 50 | 2 | value = other.value; | 51 | 2 | return *this; | 52 | 2 | } |
??4?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@QEAAAEAU0123@AEBU0123@@Z Line | Count | Source | 48 | 24 | Sample& operator=(const Sample& other) { | 49 | 24 | taken = Date{other.taken.secondsSinceUnixEpoch()}; | 50 | 24 | value = other.value; | 51 | 24 | return *this; | 52 | 24 | } |
|
53 | | |
54 | | // Note ValT MUST have comparison operators OR conversion to double defined |
55 | | |
56 | | // template <typename T> |
57 | | // bool operator>(const T& other) const { |
58 | | // return value > other; |
59 | | // } |
60 | | |
61 | | // template <typename T> |
62 | | // bool operator>=(const T& other) const { |
63 | | // return value >= other; |
64 | | // } |
65 | | |
66 | | // template <typename T> |
67 | | // bool operator<(const T& other) const { |
68 | | // return value < other; |
69 | | // } |
70 | | |
71 | | // template <typename T> |
72 | | // bool operator<=(const T& other) const { |
73 | | // return value <= other; |
74 | | // } |
75 | | |
76 | | // template <typename T> |
77 | | // bool operator==(const T& other) const { |
78 | | // return value == other; |
79 | | // } |
80 | | |
81 | | // template <typename T> |
82 | | // bool operator!=(const T& other) const { |
83 | | // return value != other; |
84 | | // } |
85 | | |
86 | 853 | operator double() const noexcept { |
87 | 853 | return (double)value; |
88 | 853 | } ??B?$Sample@H@sampling@analysis@herald@@QEBANXZ Line | Count | Source | 86 | 68 | operator double() const noexcept { | 87 | 68 | return (double)value; | 88 | 68 | } |
??B?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@QEBANXZ Line | Count | Source | 86 | 775 | operator double() const noexcept { | 87 | 775 | return (double)value; | 88 | 775 | } |
??B?$Sample@C@sampling@analysis@herald@@QEBANXZ Line | Count | Source | 86 | 10 | operator double() const noexcept { | 87 | 10 | return (double)value; | 88 | 10 | } |
|
89 | | }; |
90 | | |
91 | | /// FWD DECLARATION |
92 | | template <typename SampleListT, |
93 | | typename ValT = typename SampleListT::value_type> |
94 | | struct SampleIterator; |
95 | | |
96 | | /// A Circular container for Samples |
97 | | /// Can be used as a container in the views library |
98 | | template <typename SampleT, // This is Sample<SampleValueT> |
99 | | std::size_t MaxSize, |
100 | | typename SampleValueT = typename std::remove_cv<typename SampleT::value_type>::type |
101 | | > |
102 | | struct SampleList { |
103 | | using value_type = SampleT; // MUST be before the next line! |
104 | | using difference_type = std::size_t; |
105 | | using iterator = SampleIterator<SampleList<SampleT,MaxSize>>; |
106 | | using size_type = std::size_t; |
107 | | |
108 | | static constexpr std::size_t max_size = MaxSize; |
109 | | |
110 | 69 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} ??0?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 26 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 6 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 3 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 1 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 4 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 2 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 9 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
??0?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 110 | 18 | SampleList() : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) {} |
|
111 | | SampleList(const SampleList&) = delete; // no shallow copies allowed |
112 | 16 | SampleList(SampleList&& other) noexcept : data(std::move(other.data)), oldestPosition(other.oldestPosition), newestPosition(other.newestPosition) {} // move ctor ??0?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 112 | 4 | SampleList(SampleList&& other) noexcept : data(std::move(other.data)), oldestPosition(other.oldestPosition), newestPosition(other.newestPosition) {} // move ctor |
??0?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 112 | 12 | SampleList(SampleList&& other) noexcept : data(std::move(other.data)), oldestPosition(other.oldestPosition), newestPosition(other.newestPosition) {} // move ctor |
|
113 | | |
114 | 12 | SampleList& operator=(SampleList&& other) noexcept { |
115 | 12 | std::swap(data,other.data); |
116 | 12 | oldestPosition = other.oldestPosition; |
117 | 12 | newestPosition = other.newestPosition; |
118 | 12 | return *this; |
119 | 12 | } |
120 | | |
121 | | // Creates a list from static initialiser list elements, using deduction guide |
122 | | template <typename... MultiSampleT> |
123 | 3 | SampleList(MultiSampleT... initialiserElements) : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) { |
124 | 3 | appendData(initialiserElements...); |
125 | 3 | } |
126 | | // This one requires specified final type, but deduces constructor to use |
127 | | // SampleList(SampleT... initialiserElements) : data(), oldestPosition(SIZE_MAX), newestPosition(SIZE_MAX) { |
128 | | // appendData(initialiserElements...); |
129 | | // } |
130 | 88 | ~SampleList() = default; ??1?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 26 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 3 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 6 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 3 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 1 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 4 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 2 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 30 | ~SampleList() = default; |
??1?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA@XZ Line | Count | Source | 130 | 13 | ~SampleList() = default; |
|
131 | | |
132 | 64 | void push(Sample<SampleValueT> sample) { |
133 | 64 | incrementNewest(); |
134 | 64 | data[newestPosition] = sample; |
135 | 64 | } ?push@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXU?$Sample@VRSSI@datatype@herald@@@234@@Z Line | Count | Source | 132 | 9 | void push(Sample<SampleValueT> sample) { | 133 | 9 | incrementNewest(); | 134 | 9 | data[newestPosition] = sample; | 135 | 9 | } |
?push@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@QEAAXU?$Sample@H@234@@Z Line | Count | Source | 132 | 1 | void push(Sample<SampleValueT> sample) { | 133 | 1 | incrementNewest(); | 134 | 1 | data[newestPosition] = sample; | 135 | 1 | } |
?push@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@QEAAXU?$Sample@N@234@@Z Line | Count | Source | 132 | 2 | void push(Sample<SampleValueT> sample) { | 133 | 2 | incrementNewest(); | 134 | 2 | data[newestPosition] = sample; | 135 | 2 | } |
?push@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXU?$Sample@VRSSI@datatype@herald@@@234@@Z Line | Count | Source | 132 | 28 | void push(Sample<SampleValueT> sample) { | 133 | 28 | incrementNewest(); | 134 | 28 | data[newestPosition] = sample; | 135 | 28 | } |
?push@?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEAAXU?$Sample@UDistance@datatype@herald@@@234@@Z Line | Count | Source | 132 | 24 | void push(Sample<SampleValueT> sample) { | 133 | 24 | incrementNewest(); | 134 | 24 | data[newestPosition] = sample; | 135 | 24 | } |
|
136 | | |
137 | 223 | void push(Date taken, SampleValueT val) { |
138 | 223 | incrementNewest(); |
139 | 223 | data[newestPosition] = SampleT{taken,val}; |
140 | 223 | } ?push@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXVDate@datatype@4@VRSSI@64@@Z Line | Count | Source | 137 | 142 | void push(Date taken, SampleValueT val) { | 138 | 142 | incrementNewest(); | 139 | 142 | data[newestPosition] = SampleT{taken,val}; | 140 | 142 | } |
?push@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEAAXVDate@datatype@4@H@Z Line | Count | Source | 137 | 26 | void push(Date taken, SampleValueT val) { | 138 | 26 | incrementNewest(); | 139 | 26 | data[newestPosition] = SampleT{taken,val}; | 140 | 26 | } |
?push@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXVDate@datatype@4@VRSSI@64@@Z Line | Count | Source | 137 | 21 | void push(Date taken, SampleValueT val) { | 138 | 21 | incrementNewest(); | 139 | 21 | data[newestPosition] = SampleT{taken,val}; | 140 | 21 | } |
?push@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEAAXVDate@datatype@4@N@Z Line | Count | Source | 137 | 10 | void push(Date taken, SampleValueT val) { | 138 | 10 | incrementNewest(); | 139 | 10 | data[newestPosition] = SampleT{taken,val}; | 140 | 10 | } |
?push@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@QEAAXVDate@datatype@4@H@Z Line | Count | Source | 137 | 1 | void push(Date taken, SampleValueT val) { | 138 | 1 | incrementNewest(); | 139 | 1 | data[newestPosition] = SampleT{taken,val}; | 140 | 1 | } |
?push@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@QEAAXVDate@datatype@4@N@Z Line | Count | Source | 137 | 2 | void push(Date taken, SampleValueT val) { | 138 | 2 | incrementNewest(); | 139 | 2 | data[newestPosition] = SampleT{taken,val}; | 140 | 2 | } |
?push@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXVDate@datatype@4@VRSSI@64@@Z Line | Count | Source | 137 | 21 | void push(Date taken, SampleValueT val) { | 138 | 21 | incrementNewest(); | 139 | 21 | data[newestPosition] = SampleT{taken,val}; | 140 | 21 | } |
|
141 | | |
142 | 287 | std::size_t size() const { |
143 | 287 | if (newestPosition == SIZE_MAX) return 019 ; |
144 | 268 | if (newestPosition >= oldestPosition) { |
145 | 245 | // not overlapping the end |
146 | 245 | return newestPosition - oldestPosition + 1; |
147 | 245 | } |
148 | 23 | // we've overlapped |
149 | 23 | return (1 + newestPosition) + (data.size() - oldestPosition); |
150 | 23 | } ?size@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 75 | std::size_t size() const { | 143 | 75 | if (newestPosition == SIZE_MAX) return 012 ; | 144 | 63 | if (newestPosition >= oldestPosition) { | 145 | 48 | // not overlapping the end | 146 | 48 | return newestPosition - oldestPosition + 1; | 147 | 48 | } | 148 | 15 | // we've overlapped | 149 | 15 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 15 | } |
?size@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 14 | std::size_t size() const { | 143 | 14 | if (newestPosition == SIZE_MAX) return 00 ; | 144 | 14 | if (newestPosition >= oldestPosition) { | 145 | 14 | // not overlapping the end | 146 | 14 | return newestPosition - oldestPosition + 1; | 147 | 14 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
?size@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 32 | std::size_t size() const { | 143 | 32 | if (newestPosition == SIZE_MAX) return 00 ; | 144 | 32 | if (newestPosition >= oldestPosition) { | 145 | 32 | // not overlapping the end | 146 | 32 | return newestPosition - oldestPosition + 1; | 147 | 32 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
?size@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 21 | std::size_t size() const { | 143 | 21 | if (newestPosition == SIZE_MAX) return 01 ; | 144 | 20 | if (newestPosition >= oldestPosition) { | 145 | 12 | // not overlapping the end | 146 | 12 | return newestPosition - oldestPosition + 1; | 147 | 12 | } | 148 | 8 | // we've overlapped | 149 | 8 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 8 | } |
?size@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 4 | std::size_t size() const { | 143 | 4 | if (newestPosition == SIZE_MAX) return 02 ; | 144 | 2 | if (newestPosition >= oldestPosition) { | 145 | 2 | // not overlapping the end | 146 | 2 | return newestPosition - oldestPosition + 1; | 147 | 2 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
?size@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 4 | std::size_t size() const { | 143 | 4 | if (newestPosition == SIZE_MAX) return 02 ; | 144 | 2 | if (newestPosition >= oldestPosition) { | 145 | 2 | // not overlapping the end | 146 | 2 | return newestPosition - oldestPosition + 1; | 147 | 2 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
?size@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 131 | std::size_t size() const { | 143 | 131 | if (newestPosition == SIZE_MAX) return 01 ; | 144 | 130 | if (newestPosition >= oldestPosition) { | 145 | 130 | // not overlapping the end | 146 | 130 | return newestPosition - oldestPosition + 1; | 147 | 130 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
?size@?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEBA_KXZ Line | Count | Source | 142 | 6 | std::size_t size() const { | 143 | 6 | if (newestPosition == SIZE_MAX) return 01 ; | 144 | 5 | if (newestPosition >= oldestPosition) { | 145 | 5 | // not overlapping the end | 146 | 5 | return newestPosition - oldestPosition + 1; | 147 | 5 | } | 148 | 0 | // we've overlapped | 149 | 0 | return (1 + newestPosition) + (data.size() - oldestPosition); | 150 | 0 | } |
|
151 | | |
152 | 700 | const SampleT& operator[](std::size_t idx) const { |
153 | 700 | if (newestPosition >= oldestPosition) { |
154 | 667 | return data[idx + oldestPosition]; |
155 | 667 | } |
156 | 33 | if (idx + oldestPosition >= data.size()) { |
157 | 15 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) |
158 | 15 | return data[idx + oldestPosition - data.size()]; |
159 | 15 | } |
160 | 18 | return data[idx + oldestPosition]; |
161 | 18 | } ??A?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEBAAEBU?$Sample@VRSSI@datatype@herald@@@123@_K@Z Line | Count | Source | 152 | 121 | const SampleT& operator[](std::size_t idx) const { | 153 | 121 | if (newestPosition >= oldestPosition) { | 154 | 96 | return data[idx + oldestPosition]; | 155 | 96 | } | 156 | 25 | if (idx + oldestPosition >= data.size()) { | 157 | 11 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 11 | return data[idx + oldestPosition - data.size()]; | 159 | 11 | } | 160 | 14 | return data[idx + oldestPosition]; | 161 | 14 | } |
??A?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@QEBAAEBU?$Sample@VRSSI@datatype@herald@@@123@_K@Z Line | Count | Source | 152 | 18 | const SampleT& operator[](std::size_t idx) const { | 153 | 18 | if (newestPosition >= oldestPosition) { | 154 | 18 | return data[idx + oldestPosition]; | 155 | 18 | } | 156 | 0 | if (idx + oldestPosition >= data.size()) { | 157 | 0 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 0 | return data[idx + oldestPosition - data.size()]; | 159 | 0 | } | 160 | 0 | return data[idx + oldestPosition]; | 161 | 0 | } |
??A?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEBAAEBU?$Sample@H@123@_K@Z Line | Count | Source | 152 | 46 | const SampleT& operator[](std::size_t idx) const { | 153 | 46 | if (newestPosition >= oldestPosition) { | 154 | 46 | return data[idx + oldestPosition]; | 155 | 46 | } | 156 | 0 | if (idx + oldestPosition >= data.size()) { | 157 | 0 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 0 | return data[idx + oldestPosition - data.size()]; | 159 | 0 | } | 160 | 0 | return data[idx + oldestPosition]; | 161 | 0 | } |
??A?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEBAAEBU?$Sample@VRSSI@datatype@herald@@@123@_K@Z Line | Count | Source | 152 | 106 | const SampleT& operator[](std::size_t idx) const { | 153 | 106 | if (newestPosition >= oldestPosition) { | 154 | 106 | return data[idx + oldestPosition]; | 155 | 106 | } | 156 | 0 | if (idx + oldestPosition >= data.size()) { | 157 | 0 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 0 | return data[idx + oldestPosition - data.size()]; | 159 | 0 | } | 160 | 0 | return data[idx + oldestPosition]; | 161 | 0 | } |
??A?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEBAAEBU?$Sample@N@123@_K@Z Line | Count | Source | 152 | 19 | const SampleT& operator[](std::size_t idx) const { | 153 | 19 | if (newestPosition >= oldestPosition) { | 154 | 11 | return data[idx + oldestPosition]; | 155 | 11 | } | 156 | 8 | if (idx + oldestPosition >= data.size()) { | 157 | 4 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 4 | return data[idx + oldestPosition - data.size()]; | 159 | 4 | } | 160 | 4 | return data[idx + oldestPosition]; | 161 | 4 | } |
??A?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEBAAEBU?$Sample@VRSSI@datatype@herald@@@123@_K@Z Line | Count | Source | 152 | 376 | const SampleT& operator[](std::size_t idx) const { | 153 | 376 | if (newestPosition >= oldestPosition) { | 154 | 376 | return data[idx + oldestPosition]; | 155 | 376 | } | 156 | 0 | if (idx + oldestPosition >= data.size()) { | 157 | 0 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 0 | return data[idx + oldestPosition - data.size()]; | 159 | 0 | } | 160 | 0 | return data[idx + oldestPosition]; | 161 | 0 | } |
??A?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEBAAEBU?$Sample@UDistance@datatype@herald@@@123@_K@Z Line | Count | Source | 152 | 14 | const SampleT& operator[](std::size_t idx) const { | 153 | 14 | if (newestPosition >= oldestPosition) { | 154 | 14 | return data[idx + oldestPosition]; | 155 | 14 | } | 156 | 0 | if (idx + oldestPosition >= data.size()) { | 157 | 0 | // TODO handle the situation where this pos > newestPosition (i.e. gap in the middle) | 158 | 0 | return data[idx + oldestPosition - data.size()]; | 159 | 0 | } | 160 | 0 | return data[idx + oldestPosition]; | 161 | 0 | } |
|
162 | | |
163 | 3 | void clearBeforeDate(const Date& before) { |
164 | 3 | if (SIZE_MAX == oldestPosition) return0 ; |
165 | 12 | while (3 oldestPosition != newestPosition) { |
166 | 10 | if (data[oldestPosition].taken < before) { |
167 | 9 | ++oldestPosition; |
168 | 9 | if (data.size() == oldestPosition) { |
169 | 0 | // overflowed |
170 | 0 | oldestPosition = 0; |
171 | 0 | } |
172 | 9 | } else { |
173 | 1 | return; |
174 | 1 | } |
175 | 10 | } |
176 | 3 | // now we're on the last element |
177 | 3 | if (2 data[oldestPosition].taken < before2 ) { |
178 | 1 | // remove last element |
179 | 1 | oldestPosition = SIZE_MAX; |
180 | 1 | newestPosition = SIZE_MAX; |
181 | 1 | } |
182 | 2 | } |
183 | | |
184 | 2 | void clear() { |
185 | 2 | oldestPosition = SIZE_MAX; |
186 | 2 | newestPosition = SIZE_MAX; |
187 | 2 | } ?clear@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAAXXZ Line | Count | Source | 184 | 2 | void clear() { | 185 | 2 | oldestPosition = SIZE_MAX; | 186 | 2 | newestPosition = SIZE_MAX; | 187 | 2 | } |
Unexecuted instantiation: ?clear@?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@QEAAXXZ |
188 | | |
189 | | // SampleT latest() { |
190 | | // return data[newestPosition]; |
191 | | // } |
192 | | Date latest() { |
193 | | return data[newestPosition].taken; |
194 | | } |
195 | | |
196 | 128 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { |
197 | 128 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); |
198 | 128 | } ?begin@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 196 | 28 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { | 197 | 28 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); | 198 | 28 | } |
?begin@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@234@XZ Line | Count | Source | 196 | 7 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { | 197 | 7 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); | 198 | 7 | } |
?begin@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 196 | 16 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { | 197 | 16 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); | 198 | 16 | } |
?begin@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@234@XZ Line | Count | Source | 196 | 11 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { | 197 | 11 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); | 198 | 11 | } |
?begin@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 196 | 66 | SampleIterator<SampleList<SampleT,MaxSize>> begin() { | 197 | 66 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this); | 198 | 66 | } |
|
199 | | |
200 | 136 | SampleIterator<SampleList<SampleT,MaxSize>> end() { |
201 | 136 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)11 ; |
202 | 125 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! |
203 | 125 | } ?end@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 200 | 36 | SampleIterator<SampleList<SampleT,MaxSize>> end() { | 201 | 36 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)9 ; | 202 | 27 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! | 203 | 27 | } |
?end@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@234@XZ Line | Count | Source | 200 | 7 | SampleIterator<SampleList<SampleT,MaxSize>> end() { | 201 | 7 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)0 ; | 202 | 7 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! | 203 | 7 | } |
?end@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 200 | 16 | SampleIterator<SampleList<SampleT,MaxSize>> end() { | 201 | 16 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)0 ; | 202 | 16 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! | 203 | 16 | } |
?end@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@234@XZ Line | Count | Source | 200 | 11 | SampleIterator<SampleList<SampleT,MaxSize>> end() { | 201 | 11 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)1 ; | 202 | 10 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! | 203 | 10 | } |
?end@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@QEAA?AU?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@234@XZ Line | Count | Source | 200 | 66 | SampleIterator<SampleList<SampleT,MaxSize>> end() { | 201 | 66 | if (size() == 0) return SampleIterator<SampleList<SampleT,MaxSize>>(*this)1 ; | 202 | 65 | return SampleIterator<SampleList<SampleT,MaxSize>>(*this,size()); // calls this object's size() function, not the array! | 203 | 65 | } |
|
204 | | |
205 | | private: |
206 | | std::array<SampleT,MaxSize> data; |
207 | | std::size_t oldestPosition; |
208 | | std::size_t newestPosition; |
209 | | |
210 | 287 | void incrementNewest() { |
211 | 287 | if (SIZE_MAX == newestPosition) { |
212 | 58 | newestPosition = 0; |
213 | 58 | oldestPosition = 0; |
214 | 229 | } else { |
215 | 229 | if (newestPosition == (oldestPosition - 1)) { |
216 | 38 | ++oldestPosition; |
217 | 38 | if (oldestPosition == data.size()) { |
218 | 11 | oldestPosition = 0; |
219 | 11 | } |
220 | 38 | } |
221 | 229 | ++newestPosition; |
222 | 229 | } |
223 | 287 | if (newestPosition == data.size()) { |
224 | 16 | // just gone past the end of the container |
225 | 16 | newestPosition = 0; |
226 | 16 | if (0 == oldestPosition) { |
227 | 16 | ++oldestPosition; // erases oldest if not already removed |
228 | 16 | } |
229 | 16 | } |
230 | 287 | } ?incrementNewest@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 142 | void incrementNewest() { | 211 | 142 | if (SIZE_MAX == newestPosition) { | 212 | 23 | newestPosition = 0; | 213 | 23 | oldestPosition = 0; | 214 | 119 | } else { | 215 | 119 | if (newestPosition == (oldestPosition - 1)) { | 216 | 34 | ++oldestPosition; | 217 | 34 | if (oldestPosition == data.size()) { | 218 | 7 | oldestPosition = 0; | 219 | 7 | } | 220 | 34 | } | 221 | 119 | ++newestPosition; | 222 | 119 | } | 223 | 142 | if (newestPosition == data.size()) { | 224 | 12 | // just gone past the end of the container | 225 | 12 | newestPosition = 0; | 226 | 12 | if (0 == oldestPosition) { | 227 | 12 | ++oldestPosition; // erases oldest if not already removed | 228 | 12 | } | 229 | 12 | } | 230 | 142 | } |
?incrementNewest@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 9 | void incrementNewest() { | 211 | 9 | if (SIZE_MAX == newestPosition) { | 212 | 3 | newestPosition = 0; | 213 | 3 | oldestPosition = 0; | 214 | 6 | } else { | 215 | 6 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 6 | ++newestPosition; | 222 | 6 | } | 223 | 9 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 9 | } |
?incrementNewest@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 26 | void incrementNewest() { | 211 | 26 | if (SIZE_MAX == newestPosition) { | 212 | 6 | newestPosition = 0; | 213 | 6 | oldestPosition = 0; | 214 | 20 | } else { | 215 | 20 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 20 | ++newestPosition; | 222 | 20 | } | 223 | 26 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 26 | } |
?incrementNewest@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 21 | void incrementNewest() { | 211 | 21 | if (SIZE_MAX == newestPosition) { | 212 | 3 | newestPosition = 0; | 213 | 3 | oldestPosition = 0; | 214 | 18 | } else { | 215 | 18 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 18 | ++newestPosition; | 222 | 18 | } | 223 | 21 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 21 | } |
?incrementNewest@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 10 | void incrementNewest() { | 211 | 10 | if (SIZE_MAX == newestPosition) { | 212 | 1 | newestPosition = 0; | 213 | 1 | oldestPosition = 0; | 214 | 9 | } else { | 215 | 9 | if (newestPosition == (oldestPosition - 1)) { | 216 | 4 | ++oldestPosition; | 217 | 4 | if (oldestPosition == data.size()) { | 218 | 4 | oldestPosition = 0; | 219 | 4 | } | 220 | 4 | } | 221 | 9 | ++newestPosition; | 222 | 9 | } | 223 | 10 | if (newestPosition == data.size()) { | 224 | 4 | // just gone past the end of the container | 225 | 4 | newestPosition = 0; | 226 | 4 | if (0 == oldestPosition) { | 227 | 4 | ++oldestPosition; // erases oldest if not already removed | 228 | 4 | } | 229 | 4 | } | 230 | 10 | } |
?incrementNewest@?$SampleList@U?$Sample@H@sampling@analysis@herald@@$0P@H@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 2 | void incrementNewest() { | 211 | 2 | if (SIZE_MAX == newestPosition) { | 212 | 2 | newestPosition = 0; | 213 | 2 | oldestPosition = 0; | 214 | 2 | } else { | 215 | 0 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 0 | ++newestPosition; | 222 | 0 | } | 223 | 2 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 2 | } |
?incrementNewest@?$SampleList@U?$Sample@N@sampling@analysis@herald@@$0P@N@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 4 | void incrementNewest() { | 211 | 4 | if (SIZE_MAX == newestPosition) { | 212 | 2 | newestPosition = 0; | 213 | 2 | oldestPosition = 0; | 214 | 2 | } else { | 215 | 2 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 2 | ++newestPosition; | 222 | 2 | } | 223 | 4 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 4 | } |
?incrementNewest@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 49 | void incrementNewest() { | 211 | 49 | if (SIZE_MAX == newestPosition) { | 212 | 8 | newestPosition = 0; | 213 | 8 | oldestPosition = 0; | 214 | 41 | } else { | 215 | 41 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 41 | ++newestPosition; | 222 | 41 | } | 223 | 49 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 49 | } |
?incrementNewest@?$SampleList@U?$Sample@UDistance@datatype@herald@@@sampling@analysis@herald@@$0BJ@UDistance@datatype@4@@sampling@analysis@herald@@AEAAXXZ Line | Count | Source | 210 | 24 | void incrementNewest() { | 211 | 24 | if (SIZE_MAX == newestPosition) { | 212 | 10 | newestPosition = 0; | 213 | 10 | oldestPosition = 0; | 214 | 14 | } else { | 215 | 14 | if (newestPosition == (oldestPosition - 1)) { | 216 | 0 | ++oldestPosition; | 217 | 0 | if (oldestPosition == data.size()) { | 218 | 0 | oldestPosition = 0; | 219 | 0 | } | 220 | 0 | } | 221 | 14 | ++newestPosition; | 222 | 14 | } | 223 | 24 | if (newestPosition == data.size()) { | 224 | 0 | // just gone past the end of the container | 225 | 0 | newestPosition = 0; | 226 | 0 | if (0 == oldestPosition) { | 227 | 0 | ++oldestPosition; // erases oldest if not already removed | 228 | 0 | } | 229 | 0 | } | 230 | 24 | } |
|
231 | | |
232 | | template <typename LastT> |
233 | 3 | void appendData(LastT last) { |
234 | 3 | push(last); |
235 | 3 | } |
236 | | |
237 | | template <typename FirstT, typename SecondT, typename... Inits> |
238 | 6 | void appendData(FirstT first, SecondT second, Inits... initialiserElements) { |
239 | 6 | push(first); |
240 | 6 | appendData(second, initialiserElements...); |
241 | 6 | } ??$appendData@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@U1234@U1234@@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXU?$Sample@VRSSI@datatype@herald@@@123@00@Z Line | Count | Source | 238 | 3 | void appendData(FirstT first, SecondT second, Inits... initialiserElements) { | 239 | 3 | push(first); | 240 | 3 | appendData(second, initialiserElements...); | 241 | 3 | } |
??$appendData@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@U1234@$$V@?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$02VRSSI@datatype@4@@sampling@analysis@herald@@AEAAXU?$Sample@VRSSI@datatype@herald@@@123@0@Z Line | Count | Source | 238 | 3 | void appendData(FirstT first, SecondT second, Inits... initialiserElements) { | 239 | 3 | push(first); | 240 | 3 | appendData(second, initialiserElements...); | 241 | 3 | } |
|
242 | | }; |
243 | | // Deduction guides |
244 | | template <typename... ValT, typename CommonValT = typename std::common_type_t<ValT...>, typename CommonValTValue = typename CommonValT::value_type> |
245 | | SampleList(ValT... valueList) -> SampleList<CommonValT,sizeof...(valueList),CommonValTValue>; |
246 | | // template<typename SampleValueT> |
247 | | // SampleList(Sample<SampleValueT>... valueList) -> SampleList<Sample<SampleValueT>,sizeof...(valueList),SampleValueT>; // TODO figure out guide when we know it's a Sample<ValT> |
248 | | |
249 | | template <typename SampleListT, |
250 | | typename ValT> // from fwd decl => = typename SampleListT::value_type |
251 | | struct SampleIterator { |
252 | | using difference_type = std::size_t; |
253 | | using value_type = ValT; |
254 | | using iterator_category = std::forward_iterator_tag; |
255 | | using pointer = value_type*; |
256 | | using reference = value_type&; |
257 | | |
258 | 139 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} ??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@123@@Z Line | Count | Source | 258 | 37 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} |
??0?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@123@@Z Line | Count | Source | 258 | 7 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@123@@Z Line | Count | Source | 258 | 16 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} |
??0?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@123@@Z Line | Count | Source | 258 | 12 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@123@@Z Line | Count | Source | 258 | 67 | SampleIterator(SampleListT& sl) : list(sl), pos(0) {} |
|
259 | 125 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) ??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@123@_K@Z Line | Count | Source | 259 | 27 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) |
??0?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@123@_K@Z Line | Count | Source | 259 | 7 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@123@_K@Z Line | Count | Source | 259 | 16 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) |
??0?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@123@_K@Z Line | Count | Source | 259 | 10 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEAU?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@123@_K@Z Line | Count | Source | 259 | 65 | SampleIterator(SampleListT& sl, std::size_t from) : list(sl), pos(from) {} // used to get list.end() (size() + 1) |
|
260 | 323 | SampleIterator(const SampleIterator<SampleListT>& other) : list(other.list), pos(other.pos) {} // copy ctor ??0?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 260 | 31 | SampleIterator(const SampleIterator<SampleListT>& other) : list(other.list), pos(other.pos) {} // copy ctor |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 260 | 88 | SampleIterator(const SampleIterator<SampleListT>& other) : list(other.list), pos(other.pos) {} // copy ctor |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 260 | 50 | SampleIterator(const SampleIterator<SampleListT>& other) : list(other.list), pos(other.pos) {} // copy ctor |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@AEBU0123@@Z Line | Count | Source | 260 | 154 | SampleIterator(const SampleIterator<SampleListT>& other) : list(other.list), pos(other.pos) {} // copy ctor |
|
261 | 226 | SampleIterator(SampleIterator<SampleListT>&& other) : list(other.list), pos(other.pos) {} // move ctor (cheaper to copy) ??0?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 261 | 18 | SampleIterator(SampleIterator<SampleListT>&& other) : list(other.list), pos(other.pos) {} // move ctor (cheaper to copy) |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 261 | 30 | SampleIterator(SampleIterator<SampleListT>&& other) : list(other.list), pos(other.pos) {} // move ctor (cheaper to copy) |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 261 | 38 | SampleIterator(SampleIterator<SampleListT>&& other) : list(other.list), pos(other.pos) {} // move ctor (cheaper to copy) |
??0?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAA@$$QEAU0123@@Z Line | Count | Source | 261 | 140 | SampleIterator(SampleIterator<SampleListT>&& other) : list(other.list), pos(other.pos) {} // move ctor (cheaper to copy) |
|
262 | | ~SampleIterator() = default; |
263 | | |
264 | | // always returns const for safety |
265 | 634 | const ValT& operator*() { |
266 | 634 | return list[pos]; |
267 | 634 | } ??D?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEBU?$Sample@VRSSI@datatype@herald@@@123@XZ Line | Count | Source | 265 | 87 | const ValT& operator*() { | 266 | 87 | return list[pos]; | 267 | 87 | } |
??D?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAAAEBU?$Sample@H@123@XZ Line | Count | Source | 265 | 46 | const ValT& operator*() { | 266 | 46 | return list[pos]; | 267 | 46 | } |
??D?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEBU?$Sample@VRSSI@datatype@herald@@@123@XZ Line | Count | Source | 265 | 106 | const ValT& operator*() { | 266 | 106 | return list[pos]; | 267 | 106 | } |
??D?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@sampling@analysis@herald@@QEAAAEBU?$Sample@N@123@XZ Line | Count | Source | 265 | 19 | const ValT& operator*() { | 266 | 19 | return list[pos]; | 267 | 19 | } |
??D?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEBU?$Sample@VRSSI@datatype@herald@@@123@XZ Line | Count | Source | 265 | 376 | const ValT& operator*() { | 266 | 376 | return list[pos]; | 267 | 376 | } |
|
268 | | |
269 | | /// Implement operator+(int amt) to move this iterator forward |
270 | | SampleIterator<SampleListT>& operator+(std::size_t by) { |
271 | | pos += by; |
272 | | if (pos > list.size()) { |
273 | | pos = list.size(); // i.e. list.end() |
274 | | } |
275 | | return *this; |
276 | | } |
277 | | |
278 | | /// Implement operator+(int amt) to move this iterator forward |
279 | 8 | SampleIterator<SampleListT>& operator-(std::size_t by) { |
280 | 8 | if (by > pos) { |
281 | 0 | pos = 0; // prevents underflow and a very large value of pos (as it's a std::size_t) |
282 | 8 | } else { |
283 | 8 | pos -= by; |
284 | 8 | } |
285 | 8 | return *this; |
286 | 8 | } |
287 | | |
288 | | // to allow std::distance to work |
289 | | difference_type operator-(const SampleIterator<SampleListT>& other) { |
290 | | return pos - other.pos; |
291 | | } |
292 | | |
293 | | /// prefix operator |
294 | 449 | SampleIterator<SampleListT>& operator++() { |
295 | 449 | ++pos; // if it's one after the end of the list, then that's the same as list.end() |
296 | 449 | return *this; // reference to instance |
297 | 449 | } ??E?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEAU0123@XZ Line | Count | Source | 294 | 68 | SampleIterator<SampleListT>& operator++() { | 295 | 68 | ++pos; // if it's one after the end of the list, then that's the same as list.end() | 296 | 68 | return *this; // reference to instance | 297 | 68 | } |
??E?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEAAAEAU0123@XZ Line | Count | Source | 294 | 32 | SampleIterator<SampleListT>& operator++() { | 295 | 32 | ++pos; // if it's one after the end of the list, then that's the same as list.end() | 296 | 32 | return *this; // reference to instance | 297 | 32 | } |
??E?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEAU0123@XZ Line | Count | Source | 294 | 72 | SampleIterator<SampleListT>& operator++() { | 295 | 72 | ++pos; // if it's one after the end of the list, then that's the same as list.end() | 296 | 72 | return *this; // reference to instance | 297 | 72 | } |
??E?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@sampling@analysis@herald@@QEAAAEAU0123@XZ Line | Count | Source | 294 | 19 | SampleIterator<SampleListT>& operator++() { | 295 | 19 | ++pos; // if it's one after the end of the list, then that's the same as list.end() | 296 | 19 | return *this; // reference to instance | 297 | 19 | } |
??E?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEAAAEAU0123@XZ Line | Count | Source | 294 | 258 | SampleIterator<SampleListT>& operator++() { | 295 | 258 | ++pos; // if it's one after the end of the list, then that's the same as list.end() | 296 | 258 | return *this; // reference to instance | 297 | 258 | } |
|
298 | | |
299 | | // postfix operator |
300 | | SampleIterator<SampleListT> operator++(int) { |
301 | | SampleIterator<SampleListT> cp = *this; // copy of instance |
302 | | ++(*this); |
303 | | return cp; |
304 | | } |
305 | | |
306 | 252 | bool operator==(const SampleIterator<SampleListT>& otherIter) const { |
307 | 252 | return pos == otherIter.pos; |
308 | 252 | } ??8?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 306 | 60 | bool operator==(const SampleIterator<SampleListT>& otherIter) const { | 307 | 60 | return pos == otherIter.pos; | 308 | 60 | } |
??8?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 306 | 28 | bool operator==(const SampleIterator<SampleListT>& otherIter) const { | 307 | 28 | return pos == otherIter.pos; | 308 | 28 | } |
??8?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 306 | 34 | bool operator==(const SampleIterator<SampleListT>& otherIter) const { | 307 | 34 | return pos == otherIter.pos; | 308 | 34 | } |
??8?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 306 | 130 | bool operator==(const SampleIterator<SampleListT>& otherIter) const { | 307 | 130 | return pos == otherIter.pos; | 308 | 130 | } |
|
309 | | |
310 | 658 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { |
311 | 658 | return pos != otherIter.pos; |
312 | 658 | } ??9?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$04VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 310 | 86 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { | 311 | 86 | return pos != otherIter.pos; | 312 | 86 | } |
??9?$SampleIterator@U?$SampleList@U?$Sample@H@sampling@analysis@herald@@$04H@sampling@analysis@herald@@U?$Sample@H@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 310 | 40 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { | 311 | 40 | return pos != otherIter.pos; | 312 | 40 | } |
??9?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BE@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 310 | 114 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { | 311 | 114 | return pos != otherIter.pos; | 312 | 114 | } |
??9?$SampleIterator@U?$SampleList@U?$Sample@N@sampling@analysis@herald@@$01N@sampling@analysis@herald@@U?$Sample@N@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 310 | 30 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { | 311 | 30 | return pos != otherIter.pos; | 312 | 30 | } |
??9?$SampleIterator@U?$SampleList@U?$Sample@VRSSI@datatype@herald@@@sampling@analysis@herald@@$0BJ@VRSSI@datatype@4@@sampling@analysis@herald@@U?$Sample@VRSSI@datatype@herald@@@234@@sampling@analysis@herald@@QEBA_NAEBU0123@@Z Line | Count | Source | 310 | 388 | bool operator!=(const SampleIterator<SampleListT>& otherIter) const { | 311 | 388 | return pos != otherIter.pos; | 312 | 388 | } |
|
313 | | |
314 | | private: |
315 | | SampleListT& list; |
316 | | std::size_t pos; |
317 | | }; |
318 | | |
319 | | /// for std::distance |
320 | | template<typename T> |
321 | | typename SampleIterator<T>::difference_type distance(SampleIterator<T> first, SampleIterator<T> last) { |
322 | | return last - first; |
323 | | } |
324 | | |
325 | | } // end sampling namespace |
326 | | } |
327 | | } |
328 | | |
329 | | #endif |